export const formatUserData = (data): string => {
    if (!data) {
        return ''
    }
    let res = ''
    if (data.user) {
        let user = data.user.map(user => user.name).join("，")
        res += `【用户: [${user}]】`
    }
    if (data.org) {
        let org = data.org.map(org => {
            if (org.postId) {
                return org.name + "#" + org.postName
            } else {
                return org.name
            }
        }).join("，")
        res += `【组织: [${org}]】`
    }
    if (data.role) {
        let role = data.role.map(user => user.name).join("，")
        res += `【角色: [${role}]】`
    }
    if (data.post) {
        let post = data.post.map(user => user.name).join("，")
        res += `【职位: [${post}]】`
    }
    if (data.relation) {
        let relation = data.relation.map(user => user.name).join("，")
        res += `【关系: [${relation}]】`
    }
    return res
}